//***************************************************
// Program FOR SEPARATION OF FFP OUT OF 3BTT  CPD and SAGM
// DDP - SEPAMATIC-SL(III)
// Adapted by STEVEN LOU
// 06.08.2011
// PROGRAM STEPS
// 1.CRYO SEP1
// 2.CRYO SEP
//***************************************************
PROGRAM=SideAirOut_Test
BAG_TYPE=2BT
ALL_CLAMPS=ACE

PLACE=1;	LIQ=????;	CLAMP=A;	NET=(TOTAL-30)/1.047;	SHOULDREAD=1; 
PLACE=8;        LIQ=???;       CLAMP=E;        SHOULDREAD=0;  
PLACE=5;        LIQ=?????;     CLAMP=C;        SHOULDREAD=0;  
PL
PROG_MENUS=SB;
MB_WEIGHT=30
SB_MODE=1,5,6

E_PLUS=20
E_MINUS=20

BEGIN_PROG_ON_START
	DO_CLAMPS=CLOSE
	DO_SIDEAIR=RESET
	DO_PRESS_A=NOTHING
	DO_PRESS_B=NOTHING
END_PROG_ON_START
BEGIN_PROG_ON_FINISH
	DO_CLAMPS=OPEN
	DO_SIDEAIR=RESET
	DO_PRESS_A=MIDDLE
	DO_PRESS_B=NOTHING
END_PROG_ON_FINISH

BEGIN
	PROGRAM_STEP=???
	BEGIN
		SOURCE_PLACE=1
		DEST_PLACE=8
		ACTIVE_CLAMPS=AE
		SOURCE_LIQ=??
		DEST_LIQ=???
 		PRESS_SPEED=100
		TIMEOUT=30000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=FWD
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=MIDDLE
			DO_PRESS_B=NOTHING	                
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
			TYPE=V
			NAME=B8
		        VALUE=110
		END_REG_COND
	END_STEP
	PROGRAM_STEP=?????
	BEGIN
		SOURCE_PLACE=5
		DEST_PLACE=1
		ACTIVE_CLAMPS=AC
		SOURCE_LIQ=?????
		DEST_LIQ=??????
 		PRESS_SPEED=100
		TIMEOUT=30000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_PRESS_A=BCK
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_PRESS_A=MIDDLE
			DO_PRESS_B=NOTHING	                
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=8000
		END_REG_COND
	END_STEP

	PROGRAM_STEP=????
	BEGIN
		SOURCE_PLACE=1
		DEST_PLACE=8
		ACTIVE_CLAMPS=CE
		SOURCE_LIQ=???ν?
		DEST_LIQ=???
		PRESS_SPEED=1
		TIMEOUT=600000
		TIME_TO_STABLE=1000
		WAIT_TO_CHECKS_CONDS=1
		BEGIN_ON_START
			DO_CLAMPS=OPEN
			DO_SIDEAIR=PRESS
			DO_PRESS_A=FWD
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_SIDEAIR=RESET
			DO_PRESS_A=MIDDLE
			DO_PRESS_B=NOTHING
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
			TYPE=W
			NAME=B8
			VALUE=-5
		END_REG_COND
	END_STEP
	PROGRAM_STEP=01 ???
	BEGIN
		SHOW_MESSAGE=Please Clamp Tube
		SOURCE_PLACE=8
		DEST_PLACE=1
		ACTIVE_CLAMPS=ACE
		SOURCE_LIQ=???ν?
		DEST_LIQ=???
 		PRESS_SPEED=100
		TIMEOUT=30000
		TIME_TO_STABLE=0
		WAIT_TO_CHECKS_CONDS=0
		BEGIN_ON_START
			DO_CLAMPS=CLOSE
			DO_SIDEAIR=NOTHING
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
		END_ON_START
		BEGIN_ON_FINISH
			DO_CLAMPS=CLOSE
			DO_SIDEAIR=NOTHING
			DO_PRESS_A=NOTHING
			DO_PRESS_B=NOTHING
			LEARNING_SENSOR=D	                
		END_ON_FINISH
		BEGIN_FAIL_COND
		END_FAIL_COND
		BEGIN_REG_COND
			TYPE=C
			NAME=T
			VALUE=2000
		END_REG_COND
		BEGIN_REG_COND
			TYPE=W
			NAME=B8
			VALUE=-5
		END_REG_COND
	END_STEP
END_PROGRAM